class Version extends HtmlNode{
    constructor({version,downloadUrl,pwd,type}) {
        super(`option[version=${version}][value=${downloadUrl}]`);
        this.dataset.pwd=pwd||'' // 提取码
        this.textContent=version //版本

        Object.defineProperty(this,'type',{
            enumerable:true,
            configurable:true,
            get(){
                return type
            }
        })

        Object.defineProperty(this,"selected",{
            enumerable:true,
            configurable:true,
            get(){
                return this.el.selected
            },
            set(value){
                if (value !== this.el.selected) {
                    this.el.selected = value
                }
            }
        })
    }


}